﻿Public Class PrimativeAI
    Public MovementArray() As String
    Public Index As Integer = 0

    Public Sub IntialiseMovementArray(ByVal TestType As String, seed As Random)
        Select Case TestType
            Case "Circle"
                ReDim MovementArray(25)

                For i = 0 To 9
                    MovementArray(i) = "up"
                Next
                For i = 10 To 14
                    MovementArray(i) = "right"
                Next
                For i = 15 To 20
                    MovementArray(i) = "up"
                Next
                For i = 21 To 25
                    MovementArray(i) = "right"
                Next
            Case "Rectangle"
                ReDim MovementArray(200)

                For i = 0 To 50
                    MovementArray(i) = "up"
                Next
                For i = 98 To 100
                    MovementArray(i) = "right"
                Next
                For i = 101 To 150
                    MovementArray(i) = "up"
                Next
                For i = 151 To 155
                    MovementArray(i) = "right"
                Next
                For i = 155 To 200
                    MovementArray(i) = "right"
                Next


            Case "Still"
                ReDim MovementArray(2)
                For i = 0 To 2
                    MovementArray(i) = ""
                Next
            Case "Random"
                ReDim MovementArray(300)
                'Dim Rnd2 As New Random
                For i = 0 To 300
                    'Dim Rnd As New Random
                    Select Case seed.Next(0, 3) 'CInt(Rnd(Rnd2.Next(seed)) * 10 / 3)
                        Case 0
                            MovementArray(i) = "up"
                        Case 1
                            MovementArray(i) = "right"
                        Case 2
                            MovementArray(i) = "left"
                    End Select
                    'Rnd.Next()
                    'Rnd()
                Next
        End Select
    End Sub

    Public Sub IndexUpdate()
        Index += 1
        If Index = MovementArray.Length Then
            Index = 0
        End If
    End Sub


End Class
